Skip to content

Conversation

@lukas-heinrich
Copy link
Contributor

Hi everyone,

This PR refers to Mantis ticket 0046768: "Speicherfehler beim Laden des Dashboards".
We were able to trace the described problem back to a high number of access checks that are performed to aggregate the context for a user's news. Due to their complexity, these access checks have a negative impact on performance when there are many ILIAS objects provided.

The changes in this PR reduce the number of access checks. To accomplish this, all ILIAS objects that do not provide news at all are removed from the context before performing the access checks, and the news items are loaded from the database.

We are currently checking whether these changes also resolve the issue from 46732.
I look forward to your feedback and comments on this PR.

Best
@lukas-heinrich

@mjansenDatabay mjansenDatabay added bugfix php Pull requests that update Php code labels Jan 13, 2026
bogenschlag added a commit to TIK-NFL/ILIAS that referenced this pull request Jan 13, 2026
@bogenschlag
Copy link
Contributor

I have tried this on a test installation but (at least in combination with #10848) I get whoopses on initial login:

TypeError thrown with message "ILIAS\News\Data\LazyNewsCollection::withFetchCallback(): Argument #1 ($callback) must be of type Closure, null given, called in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/News/src/Data/LazyNewsCollection.php on line 244"

Stacktrace:
#15 TypeError in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/News/src/Data/LazyNewsCollection.php:51
#14 ILIAS\News\Data\LazyNewsCollection:withFetchCallback in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/News/src/Data/LazyNewsCollection.php:244
#13 ILIAS\News\Data\LazyNewsCollection:exclude in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/News/src/Domain/NewsCollectionService.php:203
#12 ILIAS\News\Domain\NewsCollectionService:applyFinalProcessing in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/News/src/Domain/NewsCollectionService.php:82
#11 ILIAS\News\Domain\NewsCollectionService:getNewsForUser in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/News/classes/class.ilPDNewsBlockGUI.php:49
#10 ilPDNewsBlockGUI:loadNewsData in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/News/classes/class.ilPDNewsBlockGUI.php:41
#9 ilPDNewsBlockGUI:__construct in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/Block/classes/class.ilColumnGUI.php:426
#8 ilColumnGUI:showBlocks in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/Block/classes/class.ilColumnGUI.php:406
#7 ilColumnGUI:getHTML in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/UICore/classes/class.ilCtrl.php:146
#6 ilCtrl:getHTML in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/Dashboard/classes/class.ilDashboardGUI.php:320
#5 ilDashboardGUI:getRightColumnHTML in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/Dashboard/classes/class.ilDashboardGUI.php:251
#4 ilDashboardGUI:show in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/Dashboard/classes/class.ilDashboardGUI.php:360
#3 ilDashboardGUI:jumpToSelectedItems in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/Dashboard/classes/class.ilDashboardGUI.php:232
#2 ilDashboardGUI:executeCommand in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/UICore/classes/class.ilCtrl.php:119
#1 ilCtrl:forwardCommand in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/Services/UICore/classes/class.ilCtrl.php:92
#0 ilCtrl:callBaseClass in /srv/www/vhosts/iliasdev2.tik.uni-stuttgart.de/ilias.php:29

@lukas-heinrich
Copy link
Contributor Author

Hi @bogenschlag ,

Thanks for the info! This is a known issue that has been fixed in #10833. Integration into the release branch is currently pending.

@bogenschlag
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants